import axios from "_my_utils/axios";
const baseUrl = "http://82.156.242.30:8889";
export const userList = (data) => {
  return axios.request({
    url: `${baseUrl}/common/userList`,
    data,
    method: "post",
  });
};

export const addUser = (data) => {
  return axios.request({
    url: `${baseUrl}/common/addUser`,
    data,
    method: "post",
  });
};

export const rolelist = (data) => {
  return axios.request({
    url: `${baseUrl}/common/rolelist`,
    data,
    method: "post",
  });
};

export const addRole = (data) => {
  return axios.request({
    url: `${baseUrl}/common/addRole`,
    data,
    method: "post",
  });
};

export const roleSelect = (data) => {
  return axios.request({
    url: `${baseUrl}/common/roleSelect`,
    data,
    method: "post",
  });
};

export const menuList = (data) => {
  return axios.request({
    url: `${baseUrl}/common/menuList`,
    data,
    method: "post",
  });
};

export const addMenu = (data) => {
  return axios.request({
    url: `${baseUrl}/common/addMenu`,
    data,
    method: "post",
  });
};

export const addAuth = (data) => {
  return axios.request({
    url: `${baseUrl}/common/addAuth`,
    data,
    method: "post",
  });
};

export const selectAuth = (data) => {
  return axios.request({
    url: `${baseUrl}/common/selectAuth`,
    data,
    method: "post",
  });
};

export const cancelAuth = (data) => {
  return axios.request({
    url: `${baseUrl}/common/cancelAuth`,
    data,
    method: "post",
  });
};

export const login = (data) => {
  return axios.request({
    url: `${baseUrl}/common/login`,
    data,
    method: "post",
  });
};

export const updateUser = (data) => {
  return axios.request({
    url: `${baseUrl}/common/updateUser`,
    data,
    method: "post",
  });
};

export const userRoleUpdate = (data) => {
  return axios.request({
    url: `${baseUrl}/common/userRoleUpdate`,
    data,
    method: "post",
  });
};

export const updataUserStatus = (data) => {
  return axios.request({
    url: `${baseUrl}/common/updataUserStatus`,
    data,
    method: "post",
  });
};

export const resetPassword = (data) => {
  return axios.request({
    url: `${baseUrl}/common/resetPassword`,
    data,
    method: "post",
  });
};

export const updateRole = (data) => {
  return axios.request({
    url: `${baseUrl}/common/updateRole`,
    data,
    method: "post",
  });
};

export const deleteRole = (data) => {
  return axios.request({
    url: `${baseUrl}/common/deleteRole`,
    data,
    method: "post",
  });
};

export const updateMenu = (data) => {
  return axios.request({
    url: `${baseUrl}/common/updateMenu`,
    data,
    method: "post",
  });
};

export const deleteMenu = (data) => {
  return axios.request({
    url: `${baseUrl}/common/deleteMenu`,
    data,
    method: "post",
  });
};
